package com.smartshino.face;

public class Stfaceattr
{
  int size;
  int[] locFace = new int[4];
  int[][] locPoint = new int[49][2];
  int[][] locEye = new int[2][2];
  int eyeDegree;
  int mouthDegree;
  int[] headPosi = new int[3];
  int age;
  int gender;
  int occlusion;
  int[] hFattr = new int[115];

  public Stfaceattr()
  {
    setSize(460);
  }

  public int[] gethFattr()
  {
    this.hFattr[0] = getSize();

    this.hFattr[1] = this.locFace[0];
    this.hFattr[2] = this.locFace[1];
    this.hFattr[3] = this.locFace[2];
    this.hFattr[4] = this.locFace[3];

    int j = 4;
    for (int i = 0; i < this.locPoint.length; ++i) {
      for (int m = 0; m < 2; ++m) {
        this.hFattr[(++j)] = this.locPoint[i][m];
      }
    }
    int n = 102;

    for (int i = 0; i < 2; ++i) {
      for (int k = 0; k < 2; ++k) {
        this.hFattr[(++n)] = this.locEye[i][k];
      }
    }
    this.hFattr[107] = this.eyeDegree;
    this.hFattr[108] = this.mouthDegree;

    this.hFattr[109] = this.headPosi[0];
    this.hFattr[110] = this.headPosi[1];
    this.hFattr[111] = this.headPosi[2];
    this.hFattr[112] = this.age;
    this.hFattr[113] = this.gender;
    this.hFattr[114] = this.occlusion;
    return this.hFattr;
  }

  public int getSize() {
    this.size = this.hFattr[0];
    return this.size;
  }

  public void setSize(int size) {
    this.hFattr[0] = size;
  }

  public int[] getLocFace() {
    this.locFace[0] = this.hFattr[1];
    this.locFace[1] = this.hFattr[2];
    this.locFace[2] = this.hFattr[3];
    this.locFace[3] = this.hFattr[4];
    return this.locFace;
  }

  public void setLocFace(int x, int y, int w, int h) {
    this.locFace[0] = x;
    this.locFace[1] = y;
    this.locFace[2] = w;
    this.locFace[3] = h;

    this.hFattr[1] = this.locFace[0];
    this.hFattr[2] = this.locFace[1];
    this.hFattr[3] = this.locFace[2];
    this.hFattr[4] = this.locFace[3];
  }

  public int[][] getLocPoint() {
    int m = 5;
    for (int i = 0; i < 49; ++i) {
      for (int j = 0; j < 2; ++j) {
        this.locPoint[i][j] = this.hFattr[(m++)];
      }
    }
    return this.locPoint;
  }

  public void setLocPoint(int[][] locPoint) {
    for (int i = 0; i < locPoint.length; ++i) {
      for (int j = 0; j < 2; ++j) {
        locPoint[i][j] = 0;
      }
    }
    this.locPoint = locPoint;
    for (int i = 0; i < locPoint.length; ++i);
  }

  public int[][] getLocEye()
  {
    this.locEye[0][0] = this.hFattr[103];
    this.locEye[0][1] = this.hFattr[104];
    this.locEye[1][0] = this.hFattr[105];
    this.locEye[1][1] = this.hFattr[106];
    return this.locEye;
  }

  public void setLocEye(int l0, int l1, int r0, int r1) {
    this.hFattr[103] = l0;
    this.hFattr[104] = l1;
    this.hFattr[105] = r0;
    this.hFattr[106] = r1;
  }

  public int getEyeDegree() {
    this.eyeDegree = this.hFattr[107];
    return this.eyeDegree;
  }

  public void setEyeDegree(int eyeDegree) {
    this.hFattr[107] = eyeDegree;
  }

  public int getMouthDegree() {
    this.mouthDegree = this.hFattr[108];
    return this.mouthDegree;
  }

  public void setMouthDegree(int mouthDegree) {
    this.hFattr[108] = mouthDegree;
  }

  public int[] getHeadPosi() {
    this.headPosi[0] = this.hFattr[109];
    this.headPosi[1] = this.hFattr[110];
    this.headPosi[2] = this.hFattr[111];
    return this.headPosi;
  }

  public void setHeadPosi(int shake, int turn, int up)
  {
    this.headPosi[0] = shake;
    this.headPosi[1] = turn;
    this.headPosi[2] = up;

    this.hFattr[109] = this.headPosi[0];
    this.hFattr[110] = this.headPosi[1];
    this.hFattr[111] = this.headPosi[2];
  }

  public int getAge() {
    this.age = this.hFattr[112];
    return this.age;
  }

  public void setAge(int age) {
    this.hFattr[112] = age;
  }

  public int getGender() {
    this.gender = this.hFattr[113];
    return this.gender;
  }

  public void setGender(int gender) {
    this.hFattr[113] = gender;
  }

  public int getOcclusion() {
    this.occlusion = this.hFattr[114];
    return this.occlusion;
  }

  public void setOcclusion(int occlusion) {
    this.hFattr[114] = occlusion;
  }
}